<?php $this->beginContent('/layouts/main2'); ?>
<script type="text/javascript">
    /*<![CDATA[*/
    jQuery(function($) {
        var width = $(window).width();
        if(width < 767){
            $('#column3-content').css('margin-left', '-10px');
        }
        else{
            $('#column3-content').addClass('span8');
        }
    })   
    /*]]>*/
</script>
<div class="container-fluid" style="min-height: 500px;">
    <div class="row-fluid">
        <div class="span2 hidden-phone">
            <div id="leftbar" style="min-height: 500px;">	
                <?php
                $screen = Blyn::app()->getCurrentNode()->getUIManager()->getCurrentScreen();
                $leftMenu = Blyn::app()->getAppUI()->getMenu(BUIApp::LEFTMENU);
                //$leftMenu = Blyn::app()->getAppUI()->getMenu('leftMenu');
                $items = $leftMenu['items'];
                ?>
                <ul class="nav nav-list">
                    <?php
                    foreach ($items as $item) {
                        $itemText = $item['label'];
                        $class = '';
                        //$class = isset($item['active']) && $item['active'] ? 'active' : '';
                        if (isset($item['ajaxUrl']))
                            $itemText = $item['ajaxUrl'];
                        else {
                            $class = 'nav-header';
                        }
                        ?>
                        <li class='<?php echo $class; ?>'>
                            <?php echo $itemText; ?>
                        </li>  
                    <?php } ?>
                </ul>

            </div>

        </div>        


        <div id="column3-content">
            <?php echo $content; ?>   
        </div>
        <!-- content -->


        <div class="span2 hidden-phone">
            <div id="sidebar">side bar</div>
            <!-- sidebar -->
        </div>
    </div>
</div>
<?php $this->endContent(); ?>